package com.sunducation.wts.databinding3

import androidx.databinding.ObservableArrayMap
import androidx.databinding.ObservableBoolean
import androidx.databinding.ObservableField
import androidx.databinding.ObservableInt

/*还支持ObservableParcelable<Object>序列化数据类型
上面说的这两种只会视图跟随数据更新, 数据并不会跟随视图刷新.
ObservableField同样支持addOnPropertyChangedCallback监听属性改变*/

class PlainUser {
    public var firstName: ObservableField<String> = ObservableField<String>();
    public var lastName: ObservableField<String> = ObservableField<String>();
    public var age: ObservableInt = ObservableInt();
    public var isStudent: ObservableBoolean = ObservableBoolean();
    public var student: ObservableArrayMap<String, String> = ObservableArrayMap<String, String>();
}